home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 117 / PC Guia 117.iso / Software / Utils / Software2 / Product11 / Setup.exe / MT-3.16-full-en_US / schemas / postgres.dump < prev    next >
Text File  |  2005-03-04  |  11KB  |  318 lines

  1. create table mt_author (
  2.     author_id integer not null primary key,
  3.     author_name varchar(50) not null,
  4.     author_type smallint not null,
  5.     author_nickname varchar(50),
  6.     author_password varchar(60) not null,
  7.     author_email varchar(75) not null,
  8.     author_url varchar(255),
  9.     author_can_create_blog smallint,
  10.     author_can_view_log smallint,
  11.     author_hint varchar(75),
  12.     author_created_by integer,
  13.     author_public_key text,
  14.     author_preferred_language varchar(50),
  15.     author_remote_auth_username varchar(50),
  16.     author_remote_auth_token varchar(50),
  17.     unique (author_name, author_type)
  18. );
  19. create sequence mt_author_id;
  20. create index mt_author_email on mt_author (author_email);
  21.  
  22. create table mt_blog (
  23.     blog_id integer not null primary key,
  24.     blog_name varchar(255) not null,
  25.     blog_description text,
  26.     blog_site_path varchar(255),
  27.     blog_site_url varchar(255),
  28.     blog_archive_path varchar(255),
  29.     blog_archive_url varchar(255),
  30.     blog_archive_type varchar(255),
  31.     blog_archive_type_preferred varchar(25),
  32.     blog_days_on_index smallint,
  33.     blog_language varchar(5),
  34.     blog_file_extension varchar(10),
  35.     blog_email_new_comments smallint,
  36.     blog_email_new_pings smallint,
  37.     blog_allow_comment_html smallint,
  38.     blog_autolink_urls smallint,
  39.     blog_sort_order_posts varchar(8),
  40.     blog_sort_order_comments varchar(8),
  41.     blog_allow_comments_default smallint,
  42.     blog_allow_pings_default smallint,
  43.     blog_server_offset float,
  44.     blog_convert_paras varchar(30),
  45.     blog_convert_paras_comments varchar(30),
  46.     blog_status_default smallint,
  47.     blog_allow_anon_comments smallint,
  48.     blog_allow_reg_comments smallint,
  49.     blog_allow_unreg_comments smallint,
  50.     blog_moderate_unreg_comments smallint,
  51.     blog_manual_approve_commenters smallint,
  52.     blog_words_in_excerpt smallint,
  53.     blog_ping_weblogs smallint,
  54.     blog_ping_blogs smallint,
  55.     blog_ping_others text,
  56.     blog_mt_update_key varchar(30),
  57.     blog_autodiscover_links smallint,
  58.     blog_welcome_msg text,
  59.     blog_old_style_archive_links smallint,
  60.     blog_archive_tmpl_monthly varchar(255),
  61.     blog_archive_tmpl_weekly varchar(255),
  62.     blog_archive_tmpl_daily varchar(255),
  63.     blog_archive_tmpl_individual varchar(255),
  64.     blog_archive_tmpl_category varchar(255),
  65.     blog_google_api_key varchar(32),
  66.     blog_sanitize_spec varchar(255),
  67.     blog_cc_license varchar(255),
  68.     blog_is_dynamic smallint,
  69.     blog_remote_auth_token varchar(50),    
  70.     blog_require_comment_emails smallint,
  71.     blog_ping_technorati smallint,
  72.     blog_children_modified_on timestamp not null,
  73.     blog_custom_dynamic_templates varchar(25)
  74. );
  75. create sequence mt_blog_id;
  76. create index mt_blog_name on mt_blog (blog_name);
  77.  
  78. create table mt_category (
  79.     category_id integer not null primary key,
  80.     category_blog_id integer not null,
  81.     category_allow_pings smallint,
  82.     category_label varchar(100) not null,
  83.     category_description text,
  84.     category_author_id integer,
  85.     category_ping_urls text,
  86.     category_parent integer,
  87.     unique (category_blog_id, category_label)
  88. );
  89. create sequence mt_category_id;
  90.  
  91. create table mt_comment (
  92.     comment_id integer not null primary key,
  93.     comment_commenter_id integer,
  94.     comment_visible smallint,
  95.     comment_blog_id integer not null,
  96.     comment_entry_id integer not null,
  97.     comment_ip varchar(16),
  98.     comment_author varchar(100),
  99.     comment_email varchar(75),
  100.     comment_url varchar(255),
  101.     comment_text text,
  102.     comment_created_on timestamp not null,
  103.     comment_modified_on timestamp not null,
  104.     comment_created_by integer,
  105.     comment_modified_by integer
  106. );
  107. create sequence mt_comment_id;
  108. create index mt_comment_created_on on mt_comment (comment_created_on);
  109. create index mt_comment_entry_id on mt_comment (comment_entry_id);
  110. create index mt_comment_blog_id on mt_comment (comment_blog_id);
  111.  
  112. create table mt_entry (
  113.     entry_id integer not null primary key,
  114.     entry_blog_id integer not null,
  115.     entry_status smallint not null,
  116.     entry_author_id integer not null,
  117.     entry_allow_comments smallint,
  118.     entry_allow_pings smallint,
  119.     entry_convert_breaks varchar(30),
  120.     entry_category_id integer,
  121.     entry_title varchar(255),
  122.     entry_excerpt text,
  123.     entry_text text,
  124.     entry_text_more text,
  125.     entry_to_ping_urls text,
  126.     entry_pinged_urls text,
  127.     entry_keywords text,
  128.     entry_tangent_cache text,
  129.     entry_created_on timestamp not null,
  130.     entry_modified_on timestamp not null,
  131.     entry_created_by integer,
  132.     entry_modified_by integer,
  133.     entry_basename varchar(50) not null
  134. );
  135. create sequence mt_entry_id;
  136. create index mt_entry_blog_id on mt_entry (entry_blog_id);
  137. create index mt_entry_status on mt_entry (entry_status);
  138. create index mt_entry_author_id on mt_entry (entry_author_id);
  139. create index mt_entry_created_on on mt_entry (entry_created_on);
  140. create index mt_entry_basename on mt_entry (entry_basename);
  141.  
  142. create table mt_ipbanlist (
  143.     ipbanlist_id integer not null primary key,
  144.     ipbanlist_blog_id integer not null,
  145.     ipbanlist_ip varchar(15) not null,
  146.     ipbanlist_created_on timestamp not null,
  147.     ipbanlist_modified_on timestamp not null,
  148.     ipbanlist_created_by integer,
  149.     ipbanlist_modified_by integer
  150. );
  151. create sequence mt_ipbanlist_id;
  152. create index mt_ipbanlist_blog_id on mt_ipbanlist (ipbanlist_blog_id);
  153. create index mt_ipbanlist_ip on mt_ipbanlist (ipbanlist_ip);
  154.  
  155. create table mt_log (
  156.     log_id integer not null primary key,
  157.     log_message varchar(255),
  158.     log_ip varchar(16),
  159.     log_created_on timestamp not null,
  160.     log_modified_on timestamp not null,
  161.     log_created_by integer,
  162.     log_modified_by integer
  163. );
  164. create sequence mt_log_id;
  165. create index mt_log_created_on on mt_log (log_created_on);
  166.  
  167. create table mt_notification (
  168.     notification_id integer not null primary key,
  169.     notification_blog_id integer not null,
  170.     notification_name varchar(50),
  171.     notification_email varchar(75),
  172.     notification_url varchar(255),
  173.     notification_created_on timestamp not null,
  174.     notification_modified_on timestamp not null,
  175.     notification_created_by integer,
  176.     notification_modified_by integer
  177. );
  178. create sequence mt_notification_id;
  179. create index mt_notification_blog_id on mt_notification (notification_blog_id);
  180.  
  181. create table mt_permission (
  182.     permission_id integer not null primary key,
  183.     permission_author_id integer not null,
  184.     permission_blog_id integer not null,
  185.     permission_role_mask smallint,
  186.     permission_entry_prefs varchar(255),
  187.     unique (permission_blog_id, permission_author_id)
  188. );
  189. create sequence mt_permission_id;
  190.  
  191. create table mt_placement (
  192.     placement_id integer not null primary key,
  193.     placement_entry_id integer not null,
  194.     placement_blog_id integer not null,
  195.     placement_category_id integer not null,
  196.     placement_is_primary smallint not null
  197. );
  198. create sequence mt_placement_id;
  199. create index mt_placement_entry_id on mt_placement (placement_entry_id);
  200. create index mt_placement_category_id on mt_placement (placement_category_id);
  201. create index mt_placement_is_primary on mt_placement (placement_is_primary);
  202.  
  203. create table mt_plugindata (
  204.     plugindata_id integer not null primary key,
  205.     plugindata_plugin varchar(50) not null,
  206.     plugindata_key varchar(255) not null,
  207.     plugindata_data bytea
  208. );
  209. create sequence mt_plugindata_id;
  210. create index mt_plugindata_plugin on mt_plugindata (plugindata_plugin);
  211. create index mt_plugindata_key on mt_plugindata (plugindata_key);
  212.  
  213. create table mt_template (
  214.     template_id integer not null primary key,
  215.     template_blog_id integer not null,
  216.     template_name varchar(50) not null,
  217.     template_type varchar(25) not null,
  218.     template_outfile varchar(255),
  219.     template_rebuild_me smallint,
  220.     template_text text,
  221.     template_linked_file varchar(255),
  222.     template_linked_file_mtime varchar(10),
  223.     template_linked_file_size integer,
  224.     template_created_on timestamp not null,
  225.     template_modified_on timestamp not null,
  226.     template_created_by integer,
  227.     template_modified_by integer,
  228.     template_build_dynamic smallint,
  229.     unique (template_blog_id, template_name)
  230. );
  231. create sequence mt_template_id;
  232. create index mt_template_type on mt_template (template_type);
  233.  
  234. create table mt_templatemap (
  235.     templatemap_id integer not null primary key,
  236.     templatemap_blog_id integer not null,
  237.     templatemap_template_id integer not null,
  238.     templatemap_archive_type varchar(25) not null,
  239.     templatemap_file_template varchar(255),
  240.     templatemap_is_preferred smallint not null
  241. );
  242. create sequence mt_templatemap_id;
  243. create index mt_templatemap_blog_id on mt_templatemap (templatemap_blog_id);
  244. create index mt_templatemap_template_id on mt_templatemap (templatemap_template_id);
  245. create index mt_templatemap_archive_type on mt_templatemap (templatemap_archive_type);
  246. create index mt_templatemap_is_preferred on mt_templatemap (templatemap_is_preferred);
  247.  
  248. create table mt_trackback (
  249.     trackback_id integer not null primary key,
  250.     trackback_blog_id integer not null,
  251.     trackback_title varchar(255),
  252.     trackback_description text,
  253.     trackback_rss_file varchar(255),
  254.     trackback_url varchar(255),
  255.     trackback_entry_id integer not null,
  256.     trackback_category_id integer not null,
  257.     trackback_passphrase varchar(30),
  258.     trackback_is_disabled smallint,
  259.     trackback_created_on timestamp not null,
  260.     trackback_modified_on timestamp not null,
  261.     trackback_created_by integer,
  262.     trackback_modified_by integer
  263. );
  264. create sequence mt_trackback_id;
  265. create index mt_trackback_blog_id on mt_trackback (trackback_blog_id);
  266. create index mt_trackback_entry_id on mt_trackback (trackback_entry_id);
  267. create index mt_trackback_category_id on mt_trackback (trackback_category_id);
  268. create index mt_trackback_created_on on mt_trackback (trackback_created_on);
  269.  
  270. create table mt_tbping (
  271.     tbping_id integer not null primary key,
  272.     tbping_blog_id integer not null,
  273.     tbping_tb_id integer not null,
  274.     tbping_title varchar(255),
  275.     tbping_excerpt text,
  276.     tbping_source_url varchar(255),
  277.     tbping_ip varchar(15) not null,
  278.     tbping_blog_name varchar(255),
  279.     tbping_created_on timestamp not null,
  280.     tbping_modified_on timestamp not null,
  281.     tbping_created_by integer,
  282.     tbping_modified_by integer
  283. );
  284. create sequence mt_tbping_id;
  285. create index mt_tbping_blog_id on mt_tbping (tbping_blog_id);
  286. create index mt_tbping_tb_id on mt_tbping (tbping_tb_id);
  287. create index mt_tbping_ip on mt_tbping (tbping_ip);
  288. create index mt_tbping_created_on on mt_tbping (tbping_created_on);
  289.  
  290. create table mt_session (
  291.     session_id varchar(80) not null primary key,
  292.     session_data text,
  293.     session_email varchar(255),
  294.     session_name varchar(255),
  295.     session_kind varchar(2),
  296.     session_start integer not null
  297. );
  298.  
  299. create index mt_session_start on mt_session (session_start);
  300.  
  301. create table mt_fileinfo (
  302.     fileinfo_id integer primary key,
  303.     fileinfo_blog_id integer not null,
  304.     fileinfo_entry_id integer,
  305.     fileinfo_url varchar(255),
  306.     fileinfo_file_path text,
  307.     fileinfo_template_id integer,
  308.     fileinfo_templatemap_id integer,
  309.     fileinfo_archive_type varchar(255),
  310.     fileinfo_category_id integer,
  311.     fileinfo_startdate varchar(80),
  312.     fileinfo_virtual smallint
  313. );
  314. create sequence mt_fileinfo_id;
  315. create index mt_fileinfo_blog_id on mt_fileinfo (fileinfo_blog_id);
  316. create index mt_fileinfo_entry_id on mt_fileinfo (fileinfo_entry_id);
  317. create index mt_fileinfo_url on mt_fileinfo (fileinfo_url);
  318.